for docutils < 0.19 use traverse instead of findall #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
see the code comment for some details but somehow
the docs build without errors or warnings but the side menu for sphinx-rtd-theme fails to scroll
I think this is a combination of sphinx-asdf, docutils and sphinx-rtd-theme.
Testing locally the changes in this PR appears to fix it for jwst (for the current sphinx-rtd-theme)
Part of the issue here appears to be that sphinx-rtd-theme sets an upper pin on docutils limiting it to <0.19. 0.18.1 was released in December 2021 and contains a bug in findall (which is the recommended replacement for traverse that is deprecated in newer docutils).
Docutils 18.1 has broken findall due to this issue:https://sourceforge.net/p/docutils/bugs/448/ fixed in docutils 19https://sourceforge.net/p/docutils/code/9067/ which incorrectly assigns the first node, which results in adding the bootstrap template from sphinx-asdf to the page. This conflicts with the css from sphinx-rtd-template and results in the broken menu.
I opened a test PR on JWST to see the docs built with the source branch for this PR here:
spacetelescope/jwst#7776
with built docs:
https://jwst-pipeline--7776.org.readthedocs.build/en/7776/
Note that this is impacting jwst, roman and asdf docs which all use sphinx-rtd-theme.